package com.hspedu.furns.service.impl;

import com.hspedu.furns.dao.AdminDAO;
import com.hspedu.furns.dao.impl.AdminDAOImpl;
import com.hspedu.furns.entity.Admin;
import com.hspedu.furns.service.AdminService;

/**
 * @author 徐
 * @version 1.0
 */
public class AdminServiceImpl implements AdminService {
    //定义AdminDAO属性
    private AdminDAO adminDAO = new AdminDAOImpl();
    /**
     * 根据登录传递的信息
     * @param username
     * @param password
     * @return
     */
    @Override
    public boolean loginAdmin(String username, String password) {
        Admin admin = adminDAO.queryAdminByNameAndPassword(username, password);
        if (admin != null){
            return true;
        }else {
            return false;
        }
    }
}
